From 1971cb493868a434368ad918246009f38ac81822 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 18 Feb 2004 23:30:53 +0000 Subject: [PATCH] Avoid errors when removing the plug from the socket. (#128546, Christopher Thu Feb 19 00:32:21 2004 Matthias Clasen * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Avoid errors when removing the plug from the socket. (#128546, Christopher Blizzard) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkplug.c | 7 +++++-- 6 files changed, 30 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ca8ec6f6d1..3795cc1dea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Feb 19 00:32:21 2004 Matthias Clasen + + * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Avoid errors when + removing the plug from the socket. (#128546, Christopher Blizzard) + Thu Feb 19 00:09:35 2004 Matthias Clasen * gtk/gtkradiomenuitem.h: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index ca8ec6f6d1..3795cc1dea 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Thu Feb 19 00:32:21 2004 Matthias Clasen + + * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Avoid errors when + removing the plug from the socket. (#128546, Christopher Blizzard) + Thu Feb 19 00:09:35 2004 Matthias Clasen * gtk/gtkradiomenuitem.h: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index ca8ec6f6d1..3795cc1dea 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Thu Feb 19 00:32:21 2004 Matthias Clasen + + * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Avoid errors when + removing the plug from the socket. (#128546, Christopher Blizzard) + Thu Feb 19 00:09:35 2004 Matthias Clasen * gtk/gtkradiomenuitem.h: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index ca8ec6f6d1..3795cc1dea 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Thu Feb 19 00:32:21 2004 Matthias Clasen + + * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Avoid errors when + removing the plug from the socket. (#128546, Christopher Blizzard) + Thu Feb 19 00:09:35 2004 Matthias Clasen * gtk/gtkradiomenuitem.h: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index ca8ec6f6d1..3795cc1dea 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Thu Feb 19 00:32:21 2004 Matthias Clasen + + * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Avoid errors when + removing the plug from the socket. (#128546, Christopher Blizzard) + Thu Feb 19 00:09:35 2004 Matthias Clasen * gtk/gtkradiomenuitem.h: diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c index a6efb9029a..f9c2f2bc14 100644 --- a/gtk/gtkplug.c +++ b/gtk/gtkplug.c @@ -296,8 +296,11 @@ _gtk_plug_remove_from_socket (GtkPlug *plug, GTK_PRIVATE_UNSET_FLAG (plug, GTK_IN_REPARENT); socket->plug_widget = NULL; - g_object_unref (socket->plug_window); - socket->plug_window = NULL; + if (socket->plug_window != NULL) + { + g_object_unref (socket->plug_window); + socket->plug_window = NULL; + } socket->same_app = FALSE; -- 2.30.2